Prev | Next

Changing Flag Attributes

<< | >>

Changing The Mesh Density

Overview

A flag is a grid, or mesh, of points connected together to create a set of triangles.

You can specify how many points are in the mesh by using the Horizontal Mesh and Vertical Mesh controls in the 3D Flag Options window. This section shows you how to change the flag mesh density.


The default 21x21 mesh.

Showing The Flag in Wireframe

Changing your flag's mesh size is done by setting the Horizontal Mesh and Vertical Mesh values in the 3D Flag Options window. Changing these values do not change the size of the flag.

  1. Open the "Quick Start.aep" project.
  2. In order to better see the flag's mesh, you'll want to view the flag in its default position. In the Effect Controls window, find the Pre-Roll parameter and set it to 0.
  3. Next, open the Options window by clicking the 3D Flag logo in the Effect Controls window.



  4. Pause the animation by pressing the spacebar.
  5. Change the view mode to Wireframe by clicking on the Wireframe icon.



Lowering The Mesh Density

Now that we can see our flag in wireframe mode, let's change our mesh density to be much smaller than it is by default.

  1. Change the Horizontal Mesh value to 7.

    Notice how the animation pops back to time 0:00, showing the flag in its default position. When flag attributes are changed, the flag must be rebuilt so that the effect of wind and gravity can be recalculated. This is why you set Pre-Roll to 0. When changing your mesh density, you can get a good look at how your flag is being constructed.
  2. Change the Vertical Mesh value to 5.

    Notice how the flag's size didn't change. The mesh density only affects how many rows and columns there are in the flag. It doesn't affect the size of the flag.

    Your mesh should now look like the image below.



    This mesh is a lot less dense than the default 21x21 mesh. Therefore, wind and gravity will move it differently than the default mesh.
  3. Change back to Textured mode.



  4. Now play the animation by either clicking the Restart Simulation button or pressing the spacebar.

    Notice how wind and gravity still move the flag, but the resulting movement is less dramatic. This is because there are far fewer points to be affected by wind and gravity. This flag looks like it's made out of a very stiff material, such as paper.

Increasing The Mesh Density

Now, let's make the mesh much more dense.

  1. Pause the animation by pressing the spacebar.
  2. Turn on Wireframe mode.



  3. Change Horizontal Mesh to 31.
  4. Change Vertical Mesh to 31.

    Your mesh should now look like the image below.



    Dense, indeed.
  5. Now switch back to Textured mode.



  6. Play the animation by pressing the spacebar.

    Depending on your computer speed and your graphics card, the animation may play back slowly. You may wish to switch to Frame-By-Frame mode.

    Notice how this flag contains a lot more detail than the 7x5 mesh. It has more folds and looks more grand, as if were made of a very loose material, like silk.
  7. When you're done watching the flag, click the OK button to close the Options window.

You may have noticed that the flag mesh is made into triangles by a diagonal line going from the upper-left corner to the lower-right corner of each mesh grid rectangle. In the next section, Choosing Between Right and Left Meshing, you'll learn what factors would cause you to change that meshing from "Right" to "Left."